

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
    <style>
    /* base */
    html,
    body,
    .container {
      width: 100%;
      height: 100%;
    }

    a,
    a:link,
    a:visited {
      text-decoration: none;
      color: inherit;
    }

    ul {
      list-style: none;
    }

    *,
    ::before,
    ::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    *:focus {
      outline: 0;
    }

    .container {
      display: flex;
      padding-top: 20px;
    }

    /* Nav */
    .container .doc-nav {
      position: fixed;
      height: 100%;
      margin: 0 30px 0 40px;
      width: 280px;
    }

    .doc-nav .nav-header {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      background-color: rgb(240, 241, 242);
      height: 40px;
      padding: 16px;
      font-size: 18px;
      font-weight: 500;
      color: rgb(62, 64, 66);
      cursor: pointer;
    }

    .doc-nav .nav-content {
      height: calc(100% - 40px);
      overflow-y: auto;
      color: rgb(32, 34, 36);
    }

    .doc-nav .nav-content .nav-list,
    .doc-nav .nav-content .nav-sub-list {
      line-height: 1.5rem;
    }

    .doc-nav .nav-content .nav-label {
      display: inline-block;
      position: relative;
      padding: 2px 0 2px 20px;
      margin-bottom: 4px;
    }

    .doc-nav .nav-content .nav-sub-label {
      position: relative;
      padding: 2px 0 2px 40px;
      font-size: 14px;
    }

    .doc-nav .nav-content .nav-sub-label:hover {
      text-decoration: underline;
    }

    .doc-nav .nav-content .nav-list .nav-label.group::before {
      border-bottom: 0.25rem solid transparent;
      border-left: 0.25rem solid #6e7072;
      border-right: 0;
      border-top: 0.25rem solid transparent;
      content: '';
      display: block;
      height: 0;
      left: 0.5rem;
      position: absolute;
      top: 0.625rem;
      transition: transform 0.1s linear;
      width: 0;
    }

    .doc-nav .nav-content .nav-list .nav-label.group.active::before {
      transform: rotate(90deg);
    }

    /* doc content */
    .container .doc-content {
      position: fixed;
      height: 100%;
      width: calc(100% - 80px - 40px - 30px - 240px);
      right: 0%;
      overflow-y: auto;
    }

    .doc-title {
      border-bottom: 1px solid #dcdee0;
      font-size: 22px;
      margin: 8px 0 0;
      padding-bottom: 16px;
    }

    .doc-content h3 {
      font-size: 24px;
      font-weight: 600;
      margin: 24px 0;
    }

    .doc-content h4 {
      font-size: 22px;
      font-weight: 500;
      margin: 30px 0 8px;
    }

    .doc-content h4 span {
      color: #007d9c;
    }

    .doc-content .doc-declare {
      background-color: #fafafa;
      border-radius: 5px;
      border: 1px solid #ccc;
      font-size: 14px;
      overflow-x: auto;
      padding: 10px;
      tab-size: 4;
      line-height: 20px;
    }

    .doc-content .doc-comment {
      font-size: 16px;
      margin: 16px 0;
      line-height: 24px;
      word-break: break-word;
    }
  </style>

</head>
<body>
  <div class="container">
    <div class="doc-nav">
      <a href="#Documentation" class="nav-header">Documentation</a>
      <nav class="nav-content">
        <ul class="nav-list">
          <li>
            <a href="#includes" class="nav-label">Includes</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#macros" class="nav-label">Macros</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#TUYA_OS_ADAPTER_ERROR_CODE_H" class="nav-sub-label">TUYA_OS_ADAPTER_ERROR_CODE_H</a>
              </li>
      

              <li>
                <a href="#IN" class="nav-sub-label">IN</a>
              </li>
      

              <li>
                <a href="#OUT" class="nav-sub-label">OUT</a>
              </li>
      

              <li>
                <a href="#INOUT" class="nav-sub-label">INOUT</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_INTF_INVALID" class="nav-sub-label">OPRT_OS_INTF_INVALID</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_OK" class="nav-sub-label">OPRT_OS_ADAPTER_OK</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_COM_ERROR" class="nav-sub-label">OPRT_OS_ADAPTER_COM_ERROR</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_INVALID_PARM" class="nav-sub-label">OPRT_OS_ADAPTER_INVALID_PARM</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_MALLOC_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_MALLOC_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_NOT_SUPPORTED" class="nav-sub-label">OPRT_OS_ADAPTER_NOT_SUPPORTED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_NETWORK_ERROR" class="nav-sub-label">OPRT_OS_ADAPTER_NETWORK_ERROR</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_MUTEX" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_MUTEX</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_MUTEX_CREAT_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_MUTEX_CREAT_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_MUTEX_LOCK_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_MUTEX_LOCK_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_MUTEX_UNLOCK_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_MUTEX_UNLOCK_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_MUTEX_RELEASE_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_MUTEX_RELEASE_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_SEM" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_SEM</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_SEM_CREAT_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_SEM_CREAT_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_SEM_WAIT_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_SEM_WAIT_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_SEM_POST_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_SEM_POST_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_SEM_RELEASE_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_SEM_RELEASE_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_QUEUE" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_QUEUE</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_QUEUE_CREAT_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_QUEUE_CREAT_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_QUEUE_SEND_FAIL" class="nav-sub-label">OPRT_OS_ADAPTER_QUEUE_SEND_FAIL</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_QUEUE_RECV_FAIL" class="nav-sub-label">OPRT_OS_ADAPTER_QUEUE_RECV_FAIL</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_THRD" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_THRD</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_THRD_CREAT_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_THRD_CREAT_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_THRD_RELEASE_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_THRD_RELEASE_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_THRD_JUDGE_SELF_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_THRD_JUDGE_SELF_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_SYSTEM" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_SYSTEM</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_CPU_LPMODE_SET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_CPU_LPMODE_SET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_LOG" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_LOG</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_LOG_CLOSE_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_LOG_CLOSE_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_LOG_OPEN_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_LOG_OPEN_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_WIFI" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_WIFI</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_AP_NOT_FOUND" class="nav-sub-label">OPRT_OS_ADAPTER_AP_NOT_FOUND</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_AP_SCAN_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_AP_SCAN_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_AP_RELEASE_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_AP_RELEASE_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_CHAN_SET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_CHAN_SET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_CHAN_GET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_CHAN_GET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_IP_GET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_IP_GET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_MAC_SET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_MAC_SET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_MAC_GET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_MAC_GET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_WORKMODE_SET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_WORKMODE_SET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_WORKMODE_GET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_WORKMODE_GET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_SNIFFER_SET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_SNIFFER_SET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_AP_START_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_AP_START_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_AP_STOP_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_AP_STOP_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_APINFO_GET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_APINFO_GET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_FAST_CONN_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_FAST_CONN_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_CONN_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_CONN_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_DISCONN_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_DISCONN_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_RSSI_GET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_RSSI_GET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_BSSID_GET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_BSSID_GET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_STAT_GET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_STAT_GET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_CCODE_SET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_CCODE_SET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_MGNT_SEND_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_MGNT_SEND_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_MGNT_REG_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_MGNT_REG_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_WF_LPMODE_SET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_WF_LPMODE_SET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_FLASH" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_FLASH</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_FLASH_READ_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_FLASH_READ_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_FLASH_WRITE_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_FLASH_WRITE_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_FLASH_ERASE_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_FLASH_ERASE_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_OTA" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_OTA</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_OTA_START_INFORM_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_OTA_START_INFORM_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_OTA_PKT_SIZE_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_OTA_PKT_SIZE_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_OTA_PROCESS_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_OTA_PROCESS_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_OTA_VERIFY_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_OTA_VERIFY_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_OTA_END_INFORM_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_OTA_END_INFORM_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_WD" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_WD</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_WD_INIT_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_WD_INIT_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_GPIO" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_GPIO</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_GPIO_INOUT_SET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_GPIO_INOUT_SET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_GPIO_MODE_SET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_GPIO_MODE_SET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_GPIO_WRITE_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_GPIO_WRITE_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_GPIO_IRQ_INIT_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_GPIO_IRQ_INIT_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_UART" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_UART</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_UART_INIT_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_UART_INIT_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_UART_DEINIT_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_UART_DEINIT_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_UART_SEND_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_UART_SEND_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_UART_READ_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_UART_READ_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_I2C" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_I2C</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_I2C_OPEN_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_I2C_OPEN_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_I2C_CLOSE_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_I2C_CLOSE_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_I2C_READ_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_I2C_READ_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_I2C_WRITE_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_I2C_WRITE_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_ERRCODE_BT" class="nav-sub-label">OPRT_OS_ADAPTER_ERRCODE_BT</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_BT_INIT_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_BT_INIT_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_BT_DEINIT_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_BT_DEINIT_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_BT_DISCONN_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_BT_DISCONN_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_BT_SEND_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_BT_SEND_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_BT_ADV_RESET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_BT_ADV_RESET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_BT_RSSI_GET_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_BT_RSSI_GET_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_BT_ADV_START_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_BT_ADV_START_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_BT_ADV_STOP_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_BT_ADV_STOP_FAILED</a>
              </li>
      

              <li>
                <a href="#OPRT_OS_ADAPTER_BT_SCAN_FAILED" class="nav-sub-label">OPRT_OS_ADAPTER_BT_SCAN_FAILED</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#functions" class="nav-label">Functions</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#vars" class="nav-label">Vars</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#consts" class="nav-label">Consts</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#types" class="nav-label">Types</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#typedefs" class="nav-label">Typedefs</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#UNW_ERRNO_T" class="nav-sub-label">UNW_ERRNO_T</a>
              </li>
      
            </ul>
            
          </li>
        </ul>
      </nav>
    </div>
    <div class="doc-content">
      <h2 id="Documentation" class="doc-title">Documentation</h2>
      <h3 id="includes">Includes</h3>
      
      <h3 id="macros">Macros</h3>
      

      <h4 id="TUYA_OS_ADAPTER_ERROR_CODE_H">Marco <span>TUYA_OS_ADAPTER_ERROR_CODE_H</span></h4>
      <pre class="doc-declare"><code>#define TUYA_OS_ADAPTER_ERROR_CODE_H
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="IN">Marco <span>IN</span></h4>
      <pre class="doc-declare"><code>#define IN
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OUT">Marco <span>OUT</span></h4>
      <pre class="doc-declare"><code>#define OUT
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="INOUT">Marco <span>INOUT</span></h4>
      <pre class="doc-declare"><code>#define INOUT
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_INTF_INVALID">Marco <span>OPRT_OS_INTF_INVALID</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_INTF_INVALID  -200 //Component interface service is invalid
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_OK">Marco <span>OPRT_OS_ADAPTER_OK</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_OK                     0
</code></pre>
      <pre class="doc-comment">/**
 * @brief common error code
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_COM_ERROR">Marco <span>OPRT_OS_ADAPTER_COM_ERROR</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_COM_ERROR              -1
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_INVALID_PARM">Marco <span>OPRT_OS_ADAPTER_INVALID_PARM</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_INVALID_PARM           -2
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_MALLOC_FAILED">Marco <span>OPRT_OS_ADAPTER_MALLOC_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_MALLOC_FAILED          -3
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_NOT_SUPPORTED">Marco <span>OPRT_OS_ADAPTER_NOT_SUPPORTED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_NOT_SUPPORTED          -4
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_NETWORK_ERROR">Marco <span>OPRT_OS_ADAPTER_NETWORK_ERROR</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_NETWORK_ERROR          -5
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_MUTEX">Marco <span>OPRT_OS_ADAPTER_ERRCODE_MUTEX</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_MUTEX          10100
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of mutex
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_MUTEX_CREAT_FAILED">Marco <span>OPRT_OS_ADAPTER_MUTEX_CREAT_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_MUTEX_CREAT_FAILED     -(OPRT_OS_ADAPTER_ERRCODE_MUTEX + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_MUTEX_LOCK_FAILED">Marco <span>OPRT_OS_ADAPTER_MUTEX_LOCK_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_MUTEX_LOCK_FAILED      -(OPRT_OS_ADAPTER_ERRCODE_MUTEX + 2)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_MUTEX_UNLOCK_FAILED">Marco <span>OPRT_OS_ADAPTER_MUTEX_UNLOCK_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_MUTEX_UNLOCK_FAILED    -(OPRT_OS_ADAPTER_ERRCODE_MUTEX + 3)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_MUTEX_RELEASE_FAILED">Marco <span>OPRT_OS_ADAPTER_MUTEX_RELEASE_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_MUTEX_RELEASE_FAILED   -(OPRT_OS_ADAPTER_ERRCODE_MUTEX + 4)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_SEM">Marco <span>OPRT_OS_ADAPTER_ERRCODE_SEM</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_SEM            10110
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of semaphore
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_SEM_CREAT_FAILED">Marco <span>OPRT_OS_ADAPTER_SEM_CREAT_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_SEM_CREAT_FAILED       -(OPRT_OS_ADAPTER_ERRCODE_SEM + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_SEM_WAIT_FAILED">Marco <span>OPRT_OS_ADAPTER_SEM_WAIT_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_SEM_WAIT_FAILED        -(OPRT_OS_ADAPTER_ERRCODE_SEM + 2)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_SEM_POST_FAILED">Marco <span>OPRT_OS_ADAPTER_SEM_POST_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_SEM_POST_FAILED        -(OPRT_OS_ADAPTER_ERRCODE_SEM + 3)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_SEM_RELEASE_FAILED">Marco <span>OPRT_OS_ADAPTER_SEM_RELEASE_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_SEM_RELEASE_FAILED     -(OPRT_OS_ADAPTER_ERRCODE_SEM + 4)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_QUEUE">Marco <span>OPRT_OS_ADAPTER_ERRCODE_QUEUE</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_QUEUE          10120
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of queue
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_QUEUE_CREAT_FAILED">Marco <span>OPRT_OS_ADAPTER_QUEUE_CREAT_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_QUEUE_CREAT_FAILED     -(OPRT_OS_ADAPTER_ERRCODE_QUEUE + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_QUEUE_SEND_FAIL">Marco <span>OPRT_OS_ADAPTER_QUEUE_SEND_FAIL</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_QUEUE_SEND_FAIL        -(OPRT_OS_ADAPTER_ERRCODE_QUEUE + 2)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_QUEUE_RECV_FAIL">Marco <span>OPRT_OS_ADAPTER_QUEUE_RECV_FAIL</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_QUEUE_RECV_FAIL        -(OPRT_OS_ADAPTER_ERRCODE_QUEUE + 3)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_THRD">Marco <span>OPRT_OS_ADAPTER_ERRCODE_THRD</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_THRD           10130
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of thread
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_THRD_CREAT_FAILED">Marco <span>OPRT_OS_ADAPTER_THRD_CREAT_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_THRD_CREAT_FAILED      -(OPRT_OS_ADAPTER_ERRCODE_THRD + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_THRD_RELEASE_FAILED">Marco <span>OPRT_OS_ADAPTER_THRD_RELEASE_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_THRD_RELEASE_FAILED    -(OPRT_OS_ADAPTER_ERRCODE_THRD + 2)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_THRD_JUDGE_SELF_FAILED">Marco <span>OPRT_OS_ADAPTER_THRD_JUDGE_SELF_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_THRD_JUDGE_SELF_FAILED -(OPRT_OS_ADAPTER_ERRCODE_THRD + 3)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_SYSTEM">Marco <span>OPRT_OS_ADAPTER_ERRCODE_SYSTEM</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_SYSTEM         10140
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of system
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_CPU_LPMODE_SET_FAILED">Marco <span>OPRT_OS_ADAPTER_CPU_LPMODE_SET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_CPU_LPMODE_SET_FAILED  -(OPRT_OS_ADAPTER_ERRCODE_SYSTEM + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_LOG">Marco <span>OPRT_OS_ADAPTER_ERRCODE_LOG</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_LOG            10150
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of output
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_LOG_CLOSE_FAILED">Marco <span>OPRT_OS_ADAPTER_LOG_CLOSE_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_LOG_CLOSE_FAILED       -(OPRT_OS_ADAPTER_ERRCODE_LOG + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_LOG_OPEN_FAILED">Marco <span>OPRT_OS_ADAPTER_LOG_OPEN_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_LOG_OPEN_FAILED        -(OPRT_OS_ADAPTER_ERRCODE_LOG + 2)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_WIFI">Marco <span>OPRT_OS_ADAPTER_ERRCODE_WIFI</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_WIFI           10160
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of wifi
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_AP_NOT_FOUND">Marco <span>OPRT_OS_ADAPTER_AP_NOT_FOUND</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_AP_NOT_FOUND           -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_AP_SCAN_FAILED">Marco <span>OPRT_OS_ADAPTER_AP_SCAN_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_AP_SCAN_FAILED         -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 2)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_AP_RELEASE_FAILED">Marco <span>OPRT_OS_ADAPTER_AP_RELEASE_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_AP_RELEASE_FAILED      -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 3)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_CHAN_SET_FAILED">Marco <span>OPRT_OS_ADAPTER_CHAN_SET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_CHAN_SET_FAILED        -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 4)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_CHAN_GET_FAILED">Marco <span>OPRT_OS_ADAPTER_CHAN_GET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_CHAN_GET_FAILED        -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 5)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_IP_GET_FAILED">Marco <span>OPRT_OS_ADAPTER_IP_GET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_IP_GET_FAILED          -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 6)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_MAC_SET_FAILED">Marco <span>OPRT_OS_ADAPTER_MAC_SET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_MAC_SET_FAILED         -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 7)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_MAC_GET_FAILED">Marco <span>OPRT_OS_ADAPTER_MAC_GET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_MAC_GET_FAILED         -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 8)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_WORKMODE_SET_FAILED">Marco <span>OPRT_OS_ADAPTER_WORKMODE_SET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_WORKMODE_SET_FAILED    -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 9)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_WORKMODE_GET_FAILED">Marco <span>OPRT_OS_ADAPTER_WORKMODE_GET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_WORKMODE_GET_FAILED    -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 10)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_SNIFFER_SET_FAILED">Marco <span>OPRT_OS_ADAPTER_SNIFFER_SET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_SNIFFER_SET_FAILED     -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 11)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_AP_START_FAILED">Marco <span>OPRT_OS_ADAPTER_AP_START_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_AP_START_FAILED        -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 12)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_AP_STOP_FAILED">Marco <span>OPRT_OS_ADAPTER_AP_STOP_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_AP_STOP_FAILED         -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 13)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_APINFO_GET_FAILED">Marco <span>OPRT_OS_ADAPTER_APINFO_GET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_APINFO_GET_FAILED      -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 14)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_FAST_CONN_FAILED">Marco <span>OPRT_OS_ADAPTER_FAST_CONN_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_FAST_CONN_FAILED       -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 15)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_CONN_FAILED">Marco <span>OPRT_OS_ADAPTER_CONN_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_CONN_FAILED            -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 16)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_DISCONN_FAILED">Marco <span>OPRT_OS_ADAPTER_DISCONN_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_DISCONN_FAILED         -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 17)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_RSSI_GET_FAILED">Marco <span>OPRT_OS_ADAPTER_RSSI_GET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_RSSI_GET_FAILED        -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 18)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_BSSID_GET_FAILED">Marco <span>OPRT_OS_ADAPTER_BSSID_GET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_BSSID_GET_FAILED       -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 19)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_STAT_GET_FAILED">Marco <span>OPRT_OS_ADAPTER_STAT_GET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_STAT_GET_FAILED        -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 20)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_CCODE_SET_FAILED">Marco <span>OPRT_OS_ADAPTER_CCODE_SET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_CCODE_SET_FAILED       -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 21)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_MGNT_SEND_FAILED">Marco <span>OPRT_OS_ADAPTER_MGNT_SEND_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_MGNT_SEND_FAILED       -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 22)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_MGNT_REG_FAILED">Marco <span>OPRT_OS_ADAPTER_MGNT_REG_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_MGNT_REG_FAILED        -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 23)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_WF_LPMODE_SET_FAILED">Marco <span>OPRT_OS_ADAPTER_WF_LPMODE_SET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_WF_LPMODE_SET_FAILED   -(OPRT_OS_ADAPTER_ERRCODE_WIFI + 24)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_FLASH">Marco <span>OPRT_OS_ADAPTER_ERRCODE_FLASH</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_FLASH          10210
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of flash
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_FLASH_READ_FAILED">Marco <span>OPRT_OS_ADAPTER_FLASH_READ_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_FLASH_READ_FAILED      -(OPRT_OS_ADAPTER_ERRCODE_FLASH + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_FLASH_WRITE_FAILED">Marco <span>OPRT_OS_ADAPTER_FLASH_WRITE_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_FLASH_WRITE_FAILED     -(OPRT_OS_ADAPTER_ERRCODE_FLASH + 2)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_FLASH_ERASE_FAILED">Marco <span>OPRT_OS_ADAPTER_FLASH_ERASE_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_FLASH_ERASE_FAILED     -(OPRT_OS_ADAPTER_ERRCODE_FLASH + 3)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_OTA">Marco <span>OPRT_OS_ADAPTER_ERRCODE_OTA</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_OTA            10220
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of ota
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_OTA_START_INFORM_FAILED">Marco <span>OPRT_OS_ADAPTER_OTA_START_INFORM_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_OTA_START_INFORM_FAILED -(OPRT_OS_ADAPTER_ERRCODE_OTA + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_OTA_PKT_SIZE_FAILED">Marco <span>OPRT_OS_ADAPTER_OTA_PKT_SIZE_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_OTA_PKT_SIZE_FAILED    -(OPRT_OS_ADAPTER_ERRCODE_OTA + 2)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_OTA_PROCESS_FAILED">Marco <span>OPRT_OS_ADAPTER_OTA_PROCESS_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_OTA_PROCESS_FAILED     -(OPRT_OS_ADAPTER_ERRCODE_OTA + 3)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_OTA_VERIFY_FAILED">Marco <span>OPRT_OS_ADAPTER_OTA_VERIFY_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_OTA_VERIFY_FAILED      -(OPRT_OS_ADAPTER_ERRCODE_OTA + 4)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_OTA_END_INFORM_FAILED">Marco <span>OPRT_OS_ADAPTER_OTA_END_INFORM_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_OTA_END_INFORM_FAILED  -(OPRT_OS_ADAPTER_ERRCODE_OTA + 5)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_WD">Marco <span>OPRT_OS_ADAPTER_ERRCODE_WD</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_WD             10230
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of watchdog
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_WD_INIT_FAILED">Marco <span>OPRT_OS_ADAPTER_WD_INIT_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_WD_INIT_FAILED         -(OPRT_OS_ADAPTER_ERRCODE_WD + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_GPIO">Marco <span>OPRT_OS_ADAPTER_ERRCODE_GPIO</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_GPIO           10240
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of gpio
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_GPIO_INOUT_SET_FAILED">Marco <span>OPRT_OS_ADAPTER_GPIO_INOUT_SET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_GPIO_INOUT_SET_FAILED  -(OPRT_OS_ADAPTER_ERRCODE_GPIO + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_GPIO_MODE_SET_FAILED">Marco <span>OPRT_OS_ADAPTER_GPIO_MODE_SET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_GPIO_MODE_SET_FAILED   -(OPRT_OS_ADAPTER_ERRCODE_GPIO + 2)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_GPIO_WRITE_FAILED">Marco <span>OPRT_OS_ADAPTER_GPIO_WRITE_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_GPIO_WRITE_FAILED      -(OPRT_OS_ADAPTER_ERRCODE_GPIO + 3)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_GPIO_IRQ_INIT_FAILED">Marco <span>OPRT_OS_ADAPTER_GPIO_IRQ_INIT_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_GPIO_IRQ_INIT_FAILED   -(OPRT_OS_ADAPTER_ERRCODE_GPIO + 4)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_UART">Marco <span>OPRT_OS_ADAPTER_ERRCODE_UART</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_UART           10250
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of uart
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_UART_INIT_FAILED">Marco <span>OPRT_OS_ADAPTER_UART_INIT_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_UART_INIT_FAILED       -(OPRT_OS_ADAPTER_ERRCODE_UART + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_UART_DEINIT_FAILED">Marco <span>OPRT_OS_ADAPTER_UART_DEINIT_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_UART_DEINIT_FAILED     -(OPRT_OS_ADAPTER_ERRCODE_UART + 2)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_UART_SEND_FAILED">Marco <span>OPRT_OS_ADAPTER_UART_SEND_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_UART_SEND_FAILED       -(OPRT_OS_ADAPTER_ERRCODE_UART + 3)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_UART_READ_FAILED">Marco <span>OPRT_OS_ADAPTER_UART_READ_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_UART_READ_FAILED       -(OPRT_OS_ADAPTER_ERRCODE_UART + 4)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_I2C">Marco <span>OPRT_OS_ADAPTER_ERRCODE_I2C</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_I2C            10260
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of i2c
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_I2C_OPEN_FAILED">Marco <span>OPRT_OS_ADAPTER_I2C_OPEN_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_I2C_OPEN_FAILED        -(OPRT_OS_ADAPTER_ERRCODE_I2C + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_I2C_CLOSE_FAILED">Marco <span>OPRT_OS_ADAPTER_I2C_CLOSE_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_I2C_CLOSE_FAILED       -(OPRT_OS_ADAPTER_ERRCODE_I2C + 2)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_I2C_READ_FAILED">Marco <span>OPRT_OS_ADAPTER_I2C_READ_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_I2C_READ_FAILED        -(OPRT_OS_ADAPTER_ERRCODE_I2C + 3)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_I2C_WRITE_FAILED">Marco <span>OPRT_OS_ADAPTER_I2C_WRITE_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_I2C_WRITE_FAILED       -(OPRT_OS_ADAPTER_ERRCODE_I2C + 4)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_ERRCODE_BT">Marco <span>OPRT_OS_ADAPTER_ERRCODE_BT</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_ERRCODE_BT             10270
</code></pre>
      <pre class="doc-comment">/**
 * @brief error code of bluetooth
 */</pre>

      <h4 id="OPRT_OS_ADAPTER_BT_INIT_FAILED">Marco <span>OPRT_OS_ADAPTER_BT_INIT_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_BT_INIT_FAILED         -(OPRT_OS_ADAPTER_ERRCODE_BT + 1)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_BT_DEINIT_FAILED">Marco <span>OPRT_OS_ADAPTER_BT_DEINIT_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_BT_DEINIT_FAILED       -(OPRT_OS_ADAPTER_ERRCODE_BT + 2)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_BT_DISCONN_FAILED">Marco <span>OPRT_OS_ADAPTER_BT_DISCONN_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_BT_DISCONN_FAILED      -(OPRT_OS_ADAPTER_ERRCODE_BT + 3)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_BT_SEND_FAILED">Marco <span>OPRT_OS_ADAPTER_BT_SEND_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_BT_SEND_FAILED         -(OPRT_OS_ADAPTER_ERRCODE_BT + 4)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_BT_ADV_RESET_FAILED">Marco <span>OPRT_OS_ADAPTER_BT_ADV_RESET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_BT_ADV_RESET_FAILED    -(OPRT_OS_ADAPTER_ERRCODE_BT + 5)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_BT_RSSI_GET_FAILED">Marco <span>OPRT_OS_ADAPTER_BT_RSSI_GET_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_BT_RSSI_GET_FAILED     -(OPRT_OS_ADAPTER_ERRCODE_BT + 6)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_BT_ADV_START_FAILED">Marco <span>OPRT_OS_ADAPTER_BT_ADV_START_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_BT_ADV_START_FAILED    -(OPRT_OS_ADAPTER_ERRCODE_BT + 7)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_BT_ADV_STOP_FAILED">Marco <span>OPRT_OS_ADAPTER_BT_ADV_STOP_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_BT_ADV_STOP_FAILED     -(OPRT_OS_ADAPTER_ERRCODE_BT + 8)
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="OPRT_OS_ADAPTER_BT_SCAN_FAILED">Marco <span>OPRT_OS_ADAPTER_BT_SCAN_FAILED</span></h4>
      <pre class="doc-declare"><code>#define OPRT_OS_ADAPTER_BT_SCAN_FAILED         -(OPRT_OS_ADAPTER_ERRCODE_BT + 9)
</code></pre>
      <pre class="doc-comment"></pre>
      <h3 id="functions">Functions</h3>
      
      <h3 id="vars">Vars</h3>
      
      <h3 id="consts">Consts</h3>
      
      <h3 id="types">Types</h3>
      
      <h3 id="typedefs">Typedefs</h3>
      

      <h4 id="UNW_ERRNO_T">Typedef <span>UNW_ERRNO_T</span></h4>
      <pre class="doc-declare"><code>typedef int UNW_ERRNO_T;
#define UNW_SUCCESS      0
#define UNW_FAIL         -1
#define UNW_EINTR        -2
#define UNW_EBADF        -3
#define UNW_EAGAIN       -4
#define UNW_EFAULT       -5
#define UNW_EBUSY        -6
#define UNW_EINVAL       -7
#define UNW_ENFILE       -8
#define UNW_EMFILE       -9
#define UNW_ENOSPC       -10
#define UNW_EPIPE        -11
#define UNW_EWOULDBLOCK  -12
#define UNW_ENOTSOCK     -13
#define UNW_ENOPROTOOPT  -14
#define UNW_EADDRINUSE   -15
#define UNW_EADDRNOTAVAIL -16
#define UNW_ENETDOWN     -17
#define UNW_ENETUNREACH  -18
#define UNW_ENETRESET    -19
#define UNW_ECONNRESET   -20
#define UNW_ENOBUFS      -21
#define UNW_EISCONN      -22
#define UNW_ENOTCONN     -23
#define UNW_ETIMEDOUT    -24
#define UNW_ECONNREFUSED -25
#define UNW_EHOSTDOWN    -26
#define UNW_EHOSTUNREACH -27
#define UNW_ENOMEM       -28
#define UNW_EMSGSIZE     -29

</code></pre>
      <pre class="doc-comment">/**
 * @brief tuya sdk definition of socket errno
 */</pre>
    </div>
  </body>
</html>
            